package com.hyt.it.ogt.kq.service.bm.model.param;

import com.hyt.core.ModelSerializable;
import com.hyt.core.validate.Insert;
import com.hyt.core.validate.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * <p>
 * 报名节点基础报名参数
 * </p>
 *
 * @author wangt
 * @since 2020-05-15
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "ProjectNodeBaseProjectParam对象", description = "报名节点基础报名参数")
public class ProjectNodeBaseProjectParam implements ModelSerializable {

    @NotBlank(message = "报名项目ID不能为空", groups = Update.class)
    @ApiModelProperty(value = "报名项目ID")
    private String id;

    @NotBlank(message = "项目名称不能为空", groups = {Insert.class, Update.class})
    @ApiModelProperty(value = "项目名称")
    private String projectName;

    @ApiModelProperty(value = "机构ID", hidden = true)
    private String officeId;

    @ApiModelProperty(value = "部门ID", hidden = true)
    private String deptId;

    @NotNull(message = "报名开始时间不能为空", groups = {Insert.class, Update.class})
    @ApiModelProperty(value = "报名开始时间")
    private LocalDateTime beginTime;

    @NotNull(message = "结束时间不能为空", groups = {Insert.class, Update.class})
    @ApiModelProperty(value = "结束时间")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "海报地址")
    private String postersUrl;

    @ApiModelProperty(value = "描述")
    private String description;

    @NotNull(message = "是否开放性报名不能为空", groups = {Insert.class, Update.class})
    @ApiModelProperty(value = "是否开放性报名:0非开放性,1开放性	")
    private Integer isOpen;
}
